﻿	 
@{
    

    Layout = "~/Views/Shared/Mobile/_Layout.cshtml";
   
}
  
@Html.Partial("~/Views/Shared/Mobile/_Header.cshtml")
	<script type="text/javascript" charset="utf-8">
		//unfortunately because of IE, we cannot take advantage of the script file

		//are we phonegap ready?
		function loaded() {
			window.PhoneGap ? document.addEventListener("deviceready", onDeviceReady, false) : ready();
		}

		//ready for non-phonegap
		function ready() {
			setTimeout(function () {
				window.location.href = "/Home/Index";
			}, 1000);
		}


		// PhoneGap is ready
		//
		function onDeviceReady() {

			//create the database
			//initDatabase();

			//alert(device.uuid);
			//alert(device.name);

			var dkey = device.uuid;
			var dname = device.name;
			var finalURL = "/Home/Index?dkey=" + dkey + "&dname=" + dname


			setTimeout(function () {
				window.location.href = finalURL;
			}, 500);


		}

		loaded();
    </script>

    <div id="divLoadingImage">
        <center>
            <br />
            <img src="/Images/ajax-loader2.gif" />
            <br />
        </center>
    </div>
